import java.util.Scanner;

public class Test_4 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个任意位数的正整数");
        int num = scanner.nextInt();
        //记录位数
        int countNum=0;
        while(true){
            num/=10;
            countNum++;
            if(num==0){
                  break;
            }
        }
        //第二种
        /* int countNum=1;
           while((num/=10)!=0){
               countNum++;
           }*/
       // System.out.println("这是个："+countNum+"数")；
    }


}
